home *** CD-ROM | disk | FTP | other *** search
- on CompareScripts scriptNum1, scriptNum2
- set script1 to the scriptText of member scriptNum1 of castLib "utilities"
- set script2 to the scriptText of member scriptNum2 of castLib "utilities"
- if script1 = script2 then
- put "Script" && scriptNum1 && "and script" && scriptNum2 && "are the same"
- else
- set lineCount1 to the number of lines in script1
- set lineCount2 to the number of lines in script2
- if lineCount1 <> lineCount2 then
- put "Script" && scriptNum1 & ":" && lineCount1 && "lines -- Script" && scriptNum2 & ":" && lineCount2 && "lines"
- end if
- put "Script" && scriptNum1
- repeat with lineNum = 1 to lineCount1
- if offset(line lineNum of script1, script2) = 0 then
- put " line" && lineNum && ":" && line lineNum of script1
- end if
- end repeat
- put "Script" && scriptNum2
- repeat with lineNum = 1 to lineCount2
- if offset(line lineNum of script2, script1) = 0 then
- put " line" && lineNum && ":" && line lineNum of script2
- end if
- end repeat
- end if
- end
-